<?php
namespace Home\Controller;

class IndexController extends HomeController {
    public function index(){

        // 获取地区信息
        $districts = D('District')->get();

        // 模板传值
        $this->assign('districts', $districts);

        $this->display();
    }
}